<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="./../templates/TemplateGenerale.xhtml"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html">

    <ui:define name="content">
        <f:view>
            <h:form>
                <h:dataTable value="#{prodottoManagedBean.prodotti}" var="prodotto">
                    <h:column>
                        <f:facet name="header">
                            ID
                        </f:facet>
                        <h:outputText value="#{prodotto.id}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            Nome
                        </f:facet>
                        <h:outputText value="#{prodotto.nome}" />
                    </h:column>
                    <h:column>
                        <h:commandLink action="#{carrello.add(prodotto)}" >
                            <h:outputText value="Add to Chart" />
                        </h:commandLink>
                        </h:column>
                </h:dataTable>
            </h:form>
        </f:view>

    </ui:define>

</ui:composition>
